<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>vue的修饰符</title>
		<script src="../vue@3.2.23.js"></script>
		<style>
			
		</style>
	</head>
	<body>
		<div id="app">
			<div v-for="val in formData">
				<input v-if="val.inputType == 'text'" :name="val.inputName" v-model="val.value" :placeholder="val.placeholder" :type="val.inputType" />
				<textarea v-else-if="val.inputType == 'textarea'" :name="val.inputName"  cols="30" rows="10" v-model="va.value" :placeholder="val.placeholder" ></textarea>
			</div>
			
		</div>
	</body>
</html>
<script>
	//vue的修饰符
	const {createApp} = Vue;
	const app = createApp({
		//1.0表单修饰符
		data(){
			return{
				formDate:[
					// {
					// 	inputType:'text',
					// 	inputName:'phoneNum',
					// 	placeholder:'请输入电话号码',
					// 	value:''
					// },
					// {
					// 	inputType:'text',
					// 	inputName:'nickName',
					// 	placeholder:'请输入昵称',
					// 	value:''
					// },
					// {
					// 	inputType:'textarea',
					// 	inputName:'introduce', b
					// 	placeholder:'请输入自我介绍',
					// 	value:''
					// }
				]
				
			}
		}
		
	});
	const vm = app.mount('app')
</script>